<!DOCTYPE HTML>

<html>
	<head>
		<title>RL Trader - RLFXer</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
		<link rel="stylesheet" href="assets/css/main.css" />
	</head>
	<body class="is-preload">

		<!-- Header -->
			<section id="header">
				<header>
					<span class="image avatar"><img src="assets/images/avatar.jpg" alt="" /></span>
					<h1 id="logo"><a href="#">RLFXer</a></h1>
					<p>Reinforcement Learning is cool.<br/>
					There are still lots of things to learn.</p>
				</header>
				<nav id="nav">
					<ul>
						<li><a href="#one" class="active">About Me</a></li>
						<li><a href="#two">Trading Strategy</a></li>
						<li><a href="#three">Too Young Too Simple</a></li>
						<li><a href="#four">Reinforcement Learning</a></li>
						<li><a href="#five">Training History</a></li>
						<li><a href="#six">Achievements</a></li>
					</ul>
				</nav>
				<footer>
					<ul class="icons">
						<li><a href="https://www.twitch.tv/rlfxer" target="_blank" class="icon fa-twitch"><span class="label">Twitch</span></a></li>
					</ul>
				</footer>
			</section>

		<!-- Wrapper -->
			<div id="wrapper">

				<!-- Main -->
					<div id="main">

						<!-- One -->
							<section id="one">
								<div class="image main" data-position="center">
									<img src="assets/images/banner.jpg" alt="" />
								</div>
								<div class="container">
									<header class="major">
										<h2>RLFXer</h2>
										<p>Trained with Reinforcement Learning,<br>
											Developed and Tuned by <a href="https://github.com/RainBoltz">Chun-Chieh Wang.</a><br />
											<a href="http://www.forex-central.net/sure-fire-forex-hedging-strategy.php">SURE-FIRE</a> Hedging Strategy is used.</p>
									</header>
									<p>&emsp;In recent years, FinTech has become a popular topic. One of the things is "Robo-Advisor", which allows investors to get advice on money management or investment at a low cost. However, most of the investors are not interested in the investing strategies that the robo-advisors executed, instead, they will just choose a robo-advisor according to the past investment performance provided by the industry. There is no way to confidently understand the actual investing strategy.<br>&emsp;The goal of this project is to develop a foreign exchange investment strategy optimization platform.</p>
								</div>
							</section>

						<!-- Two -->
							<section id="two">
								<div class="container">
									<h3>Sure-Fire </h3>
									<p>The forex trading technique is simply...awesome. If you are able to look at a chart and identify when the market is trending, then you can make a bundle using the below technique. If we had to pick one single trading technique in the world, this would be the one! Make sure to use proper position sizing and money management with this one and you will encounter nothing but success!</p>
									<div class="box alt" style="text-align: center;"><img src="assets/images/sure-fire.gif" alt="sure-fire animation" /></div>
								</div>
							</section>

						<!-- Three -->
							<section id="three">
								<div class="container">
									<h3>Too Young Too Simple...</h3>
									<p>The basic Sure-Fire strategy is based on the sense of a trader. Hyperparameters such as the ratio of take-profit and stop-loss, usually depend on the traders' observation or experience.<br>
									Here are the results of setting 30 pips of take-profit and 60 pips of stop-loss:</p>
									<div class="features">
										<!-- Tab links -->
										<div class="tab">
										  <button class="tablinks_1 active" onclick="section1_tab(event, 'section_1_1')">EURUSD</button>
										  <button class="tablinks_1" onclick="section1_tab(event, 'section_1_2')">GBPUSD</button>
										  <button class="tablinks_1" onclick="section1_tab(event, 'section_1_3')">AUDUSD</button>
										</div>

										<!-- Tab content -->
										<div id="section_1_1" class="tabcontent_1" style="display: block">
										  <article style="margin: 1em">
											<a onclick="show_modal(this)" class="image haveModalImg"><img src="assets/images/constant_EURUSD.png" alt="Sure-Fire with Constant on EURUSD" /></a>
											<div class="inner">
												<h4>EURUSD - 4H<br>2018/08/01~2018/11/30</h4>
												<p>
													<div class="table-wrapper">
														<table class="alt">
															<tbody style="font-size: 13px">
																<tr>
																	<td>Total Trades</td>
																	<td>Win Trades</td>
																	<td>Lose Trades</td>
																</tr>
																<tr>
																	<td>866</td>
																	<td>715</td>
																	<td>151</td>
																</tr>
																<tr>
																	<td>Net Profit</td>
																	<td>Profit Factor</td>
																	<td>Max Drawdown</td>
																</tr>
																<tr>
																	<td>2361</td>
																	<td>2.32</td>
																	<td>-3.30%</td>
																</tr>
															</tbody>
														</table>
													</div>
												</p>
											</div>
										  </article>
										</div>

										<div id="section_1_2" class="tabcontent_1" style="display: none">
										  <article style="margin: 1em">
											<a onclick="show_modal(this)" class="image haveModalImg"><img src="assets/images/constant_GBPUSD.png" alt="Sure-Fire with Constant on GBPUSD" /></a>
											<div class="inner">
												<h4>GBPUSD - 4H <br>2018/08/01~2018/11/30</h4>
												<p>
													<div class="table-wrapper">
														<table class="alt">
															<tbody style="font-size: 13px">
																<tr>
																	<td>Total Trades</td>
																	<td>Win Trades</td>
																	<td>Lose Trades</td>
																</tr>
																<tr>
																	<td>916</td>
																	<td>786</td>
																	<td>130</td>
																</tr>
																<tr>
																	<td>Net Profit</td>
																	<td>Profit Factor</td>
																	<td>Max Drawdown</td>
																</tr>
																<tr>
																	<td>3006</td>
																	<td>2.91</td>
																	<td>-2.00%</td>
																</tr>
															</tbody>
														</table>
													</div>
												</p>
											</div>
										  </article>
										</div>

										<div id="section_1_3" class="tabcontent_1" style="display: none">
										  <article style="margin: 1em">
											<a onclick="show_modal(this)" class="image haveModalImg"><img src="assets/images/constant_AUDUSD.png" alt="Sure-Fire with Constant on AUDUSD" /></a>
											<div class="inner">
												<h4>AUDUSD - 4H <br>2018/08/01~2018/11/30</h4>
												<p>
													<div class="table-wrapper">
														<table class="alt">
															<tbody style="font-size: 13px">
																<tr>
																	<td>Total Trades</td>
																	<td>Win Trades</td>
																	<td>Lose Trades</td>
																</tr>
																<tr>
																	<td>869</td>
																	<td>695</td>
																	<td>174</td>
																</tr>
																<tr>
																	<td>Net Profit</td>
																	<td>Profit Factor</td>
																	<td>Max Drawdown</td>
																</tr>
																<tr>
																	<td>2032</td>
																	<td>2.01</td>
																	<td>-2.95%</td>
																</tr>
															</tbody>
														</table>
													</div>
												</p>
											</div>
										  </article>
										</div>
									</div>
								</div>
							</section>

						<!-- Four -->
							<section id="four">
								<div class="container">
									<h3>Reinforcement Learning</h3>
									<p>I've been looking for a best algorithm to complete my learning method, so I decided to try both Value-based and Policy-based methods.</p>
									<div class="features">
										<article>
											<a href="dqn.pdf" class="image" target="_blank"><img src="assets/images/dqn.png" alt="" /></a>
											<div class="inner">
												<h4>Deep Q Learning (DQN)</h4>
												<p>The Deep Q learning is about using deep learning techniques to represent the Q table that based on the Q-Learning algorithm.</p>
											</div>
										</article>
										<article>
											<a href="ppo.pdf" class="image" target="_blank"><img src="assets/images/ac.png" alt="" /></a>
											<div class="inner">
												<h4>Proximal Policy Optimization (PPO)</h4>
												<p>Policy Gradient methods have convergence problem which is addressed by the natural policy gradient. For this reason, PPO formalizes the constraint as a penalty in the objective function instead of imposing a hard constraint.</p>
											</div>
										</article>
									</div>
								</div>
							</section>


						<!-- Five -->
							<section id="five">
								<div class="container">
									<h3>During Training...</h3>
									<p>Although Deep Q Learning uses a deep neural network for calculating the Q values, the decisions were made by a simple Value function and it is almost impossible for DQN to solve the complicated problems. <br>
									Proximal Policy Optimization performs better than DQN, but a policy gradient method will always have to confront a slow convergence.</p>
									<div class="features">
                                        <h4>DQN algorithm</h4>
										<article>
										<div class="features">
											<!-- Tab links -->
											<div class="tab">
											  <button class="tablinks_2 active" onclick="section2_tab(event, 'section_2_1')">EURUSD</button>
											  <button class="tablinks_2" onclick="section2_tab(event, 'section_2_2')">GBPUSD</button>
											  <button class="tablinks_2" onclick="section2_tab(event, 'section_2_3')">AUDUSD</button>
											</div>

											<!-- Tab content -->
											<div id="section_2_1" class="tabcontent_2" style="display: block">
											  <div style="margin: 1em; text-align:center;">
												<a onclick="show_modal(this)" class="image haveModalImg" style="width: 80%"><img src="assets/images/DQN_EURUSD.gif" alt="DQN training (EURUSD)" /></a>
												
											  </div>
											</div>

											<div id="section_2_2" class="tabcontent_2" style="display: none">
											  <div style="margin: 1em; text-align:center;">
												<a onclick="show_modal(this)" class="image haveModalImg" style="width: 80%"><img src="assets/images/DQN_GBPUSD.gif" alt="DQN training (GBPUSD)" /></a>
												
											  </div>
											</div>

											<div id="section_2_3" class="tabcontent_2" style="display: none">
											  <div style="margin: 1em; text-align:center;">
												<a onclick="show_modal(this)" class="image haveModalImg" style="width: 80%"><img src="assets/images/DQN_AUDUSD.gif" alt="DQN training (AUDUSD)" /></a>
												
											  </div>
											</div>
										</div>
										</article>
                                        <h4>PPO algorithm</h4>
										<article>
										<div class="features">
											<!-- Tab links -->
											<div class="tab">
											  <button class="tablinks_3 active" onclick="section3_tab(event, 'section_3_1')">EURUSD</button>
											  <button class="tablinks_3" onclick="section3_tab(event, 'section_3_2')">GBPUSD</button>
											  <button class="tablinks_3" onclick="section3_tab(event, 'section_3_3')">AUDUSD</button>
											</div>

											<!-- Tab content -->
											<div id="section_3_1" class="tabcontent_3" style="display: block">
											  <div style="margin: 1em; text-align:center;">
												<a onclick="show_modal(this)" class="image haveModalImg" style="width: 80%"><img src="assets/images/PPO_EURUSD.gif" alt="PPO training (EURUSD)" /></a>
												
											  </div>
											</div>

											<div id="section_3_2" class="tabcontent_3" style="display: none">
											  <div style="margin: 1em; text-align:center;">
												<a onclick="show_modal(this)" class="image haveModalImg" style="width: 80%"><img src="assets/images/PPO_GBPUSD.gif" alt="PPO training (GBPUSD)" /></a>
												
											  </div>
											</div>

											<div id="section_3_3" class="tabcontent_3" style="display: none">
											  <div style="margin: 1em; text-align:center;">
												<a onclick="show_modal(this)" class="image haveModalImg" style="width: 80%"><img src="assets/images/PPO_AUDUSD.gif" alt="PPO training (AUDUSD)" /></a>
												
											  </div>
											</div>
										</div>
										</article>
									</div>
								</div>
							</section>



						<!-- Six -->
							<section id="six">
								<div class="container">
									<h3>Achievements</h3>
									<p>Now I will show you the results of trading with the models over the next month...</p>
									<div class="features">
                                    <!-- Tab links -->
                                    <div class="tab">
                                      <button class="tablinks_4" onclick="section4_tab(event, 'section_4_1')">EURUSD</button>
                                      <button class="tablinks_4" onclick="section4_tab(event, 'section_4_2')">GBPUSD</button>
                                      <button class="tablinks_4 active" onclick="section4_tab(event, 'section_4_3')">AUDUSD</button>
                                    </div>

                                    <!-- Tab content -->
                                    <div id="section_4_1" class="tabcontent_4" style="display: none">
                                      <article style="margin: 1em">
                                        <a onclick="show_modal(this)" class="image haveModalImg"><img src="assets/images/EURUSD_TEST.png" alt="EURUSD testing results" /></a>
                                        <div class="inner">
                                            <h4>EURUSD - 4H @ 1300episode<br>2018/12/01~2018/12/31</h4>
                                            <p>
                                                <div class="table-wrapper">
                                                    <table class="alt" style="font-size: 13px">
                                                        <thead>
                                                            <tr>
                                                                <td> </td>
                                                                <td>Net Profit</td>
                                                                <td>Profit Factor</td>
                                                                <td>Max Drawdown</td>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr>
                                                                <td>Baseline</td>
                                                                <td><b style="color:black">753</td>
                                                                <td>3.67<b></td>
                                                                <td>-5.18%</td>
                                                            </tr>
                                                            <tr>
                                                                <td>DQN</td>
                                                                <td>486</td>
                                                                <td>3.09</td>
                                                                <td>-3.70%</td>
                                                            </tr>
                                                            <tr>
                                                                <td>PPO</td>
                                                                <td>615</td>
                                                                <td><b style="color:black">3.82<b></td>
                                                                <td><b style="color:black">-2.92%<b></td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </p>
                                        </div>
                                      </article>
                                    </div>
                                    
                                    <div id="section_4_2" class="tabcontent_4" style="display: none">
                                      <article style="margin: 1em">
                                      <a onclick="show_modal(this)" class="image haveModalImg"><img src="assets/images/GBPUSD_TEST.png" alt="GBPUSD testing results" /></a>
                                      <div class="inner">
                                            <h4>GBPUSD - 4H @ 1300episode<br>2018/12/01~2018/12/31</h4>
                                            <p>
                                                <div class="table-wrapper">
                                                    <table class="alt" style="font-size: 13px">
                                                        <thead>
                                                            <tr>
                                                                <td> </td>
                                                                <td>Net Profit</td>
                                                                <td>Profit Factor</td>
                                                                <td>Max Drawdown</td>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr>
                                                                <td>Baseline</td>
                                                                <td>753<b></td>
                                                                <td>3.24</td>
                                                                <td>-5.58%</td>
                                                            </tr>
                                                            <tr>
                                                                <td>DQN</td>
                                                                <td>717</td>
                                                                <td>3.10</td>
                                                                <td>-4.63%</td>
                                                            </tr>
                                                            <tr>
                                                                <td>PPO</td>
                                                                <td><b style="color:black">763<b></td>
                                                                <td><b style="color:black">4.47<b></td>
                                                                <td><b style="color:black">-4.33%<b></td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </p>
                                        </div>
                                      </article>
                                    </div>

                                    <div id="section_4_3" class="tabcontent_4" style="display: block">
                                      <article style="margin: 1em">
                                        <a onclick="show_modal(this)" class="image haveModalImg"><img src="assets/images/AUDUSD_TEST.png" alt="AUDUSD testing results" /></a>
                                        <div class="inner">
                                            <h4>AUDUSD - 4H @ 1300episode<br>2018/12/01~2018/12/31</h4>
                                            <p>
                                                <div class="table-wrapper">
                                                    <table class="alt" style="font-size: 13px">
                                                        <thead>
                                                            <tr>
                                                                <td> </td>
                                                                <td>Net Profit</td>
                                                                <td>Profit Factor</td>
                                                                <td>Max Drawdown</td>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr>
                                                                <td>Baseline</td>
                                                                <td>351</td>
                                                                <td>1.62</td>
                                                                <td>-14.53%</td>
                                                            </tr>
                                                            <tr>
                                                                <td>DQN</td>
                                                                <td>402</td>
                                                                <td>2.32</td>
                                                                <td><b style="color:black">-5.97%</b></td>
                                                            </tr>
                                                            <tr>
                                                                <td>PPO</td>
                                                                <td><b style="color:black">597</b></td>
                                                                <td><b style="color:black">2.85</b></td>
                                                                <td>-7.62%</td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </p>
                                        </div>
                                      </article>
                                    </div>
                                    </div>
								</div>
							</section>


					</div> 
				
				<!-- Footer -->
					<section id="footer">
						<div class="container">
							<ul class="copyright">
								<li>RainBoltz&copy;. All rights reserved.</li><li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
							</ul>
						</div>
					</section>

			</div>
            <!-- The Modal -->
            <div id="myModal" class="modal">
              <span class="modal-close-btn">&times;</span>
              <img class="modal-content" id="modal-img">
              <div id="modal-caption"></div>
            </div>

		<!-- Scripts -->
			<script src="assets/js/jquery.min.js"></script>
			<script src="assets/js/jquery.scrollex.min.js"></script>
			<script src="assets/js/jquery.scrolly.min.js"></script>
			<script src="assets/js/browser.min.js"></script>
			<script src="assets/js/breakpoints.min.js"></script>
			<script src="assets/js/util.js"></script>
			<script src="assets/js/main.js"></script>

	</body>
</html>
